cmake_minimum_required(VERSION 3.5)

project(raycast)
# set(CMAKE_CXX_STANDARD 11)

# set (CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS}  -lasan -lstdc++ ")
# set(CMAKE_BUILD_TYPE Debug)
# find_package(CUDA REQUIRED)
# set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-lasan ;-std=c++11 ;-O3;-w;-Xcudafe "--diag_suppress=boolean_controlling_expr_is_constant")#;-G;-g$

find_package(OpenCV REQUIRED)
find_package(Eigen3 REQUIRED)

include_directories(
	${EIGEN3_INCLUDE_DIRS}
	${OpenCV_INCLUDE_DIRS}
	./
)

file(GLOB SRC ./*.cu* ./*.cpp*)

cuda_add_library(raycast ${SRC})

target_link_libraries(raycast   
	${OpenCV_LIBS}
	${CUDA_LIBS}
	${CMAKE_DL_LIBS} -lpthread 
) 


# cuda_add_executable(main app/mgfusion.cu)
# target_link_libraries(main raycast)